package com.example.designpatterns.creational.builder;

/**
 * @author zuitu@foxmail.com
 * @date 2024/1/18
 */
public class Burger {
    private final int size;
    private final boolean cheese;
    private final boolean pepperoni;
    private final boolean lettuce;
    private final boolean tomato;

    public Burger(BurgerBuilder builder) {
        this.size = builder.getSize();
        this.cheese = builder.getCheese();
        this.pepperoni = builder.getPepperoni();
        this.lettuce = builder.getLettuce();
        this.tomato = builder.getTomato();
    }

    @Override
    public String toString() {
        return "Burger{" +
                "size=" + size +
                ", cheese=" + cheese +
                ", pepperoni=" + pepperoni +
                ", lettuce=" + lettuce +
                ", tomato=" + tomato +
                '}';
    }
}
